<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>订单详情</title>
</head>
<style type="text/css">
/* CSS Document */

body {
font: normal auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
background: #E6EAE9;
}

a {
color: #c75f3e;
}

#mytable {
width: 1200px;
padding: 0;
margin: 0;
}

caption {
padding: 0 0 5px 0;
width: 700px;
font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
text-align: right;
}

th {
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
border-top: 1px solid #C1DAD7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: left;
padding: 6px 6px 6px 12px;
background: #CAE8EA no-repeat;
}
/*power by www.winshell.cn*/
th.nobg {
border-top: 0;
border-left: 0;
border-right: 1px solid #C1DAD7;
background: none;
}

td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
font-size:14px;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
/*power by www.winshell.cn*/

td.alt {
background: #F5FAFA;
color: #797268;
}

th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #fff no-repeat;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}

th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #f5fafa no-repeat;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #797268;
}
/*---------for IE 5.x bug*/
body,th {
font-family: 宋体, Arial;
font-size: 12px;
}
</style>
<script type="text/javascript" src="/public/javascripts/jquery-1.6.4.min.js"></script>
<link rel="stylesheet" href="/public/stylesheets/alert.css" type="text/css" />
<script type="text/javascript" src="/public/javascripts/adu.alert.js"></script>
<script type="text/javascript" src="/public/datepicker/WdatePicker.js"></script>
<body>
<div>
	<table id="mytable" cellspacing="0" summary="The technical specifications of the Apple PowerMac G5 series">
		<caption> </caption>
		<tr>
			<th scope="col">编号</th>
			<th scope="col">借阅数量</th>
			<th scope="col">借阅时间</th>
			<th scope="col">正常归还时间</th>
			<th scope="col">实际归还时间</th>
			<th scope="col">借阅书籍状态</th>
			<th scope="col">借阅书籍</th>
			<th scope="col">借阅书籍条码</th>
			<th scope="col">借阅书籍库位</th>
			<th scope="col">借阅书籍封面</th>
			
		</tr>
		 #{list items:indlist.borrows, as:'blist'}
			<tr>
				<td class="row">${blist?.id}</td>
				<td class="row">${blist?.boramo}</td>
				<td class="row"><a onclick="updatatime(${blist.id},'${service.BorrowService.time(blist?.bortime)}');" href="javascript:void(0);">${service.BorrowService.time(blist?.bortime)}</a></td>
				<td class="row">${service.BorrowService.time(blist?.borsbt)}</td>
				<td class="row">${service.BorrowService.time(blist?.borrbt)}</td>
				<td class="row">${blist?.borsta}</td>
				<td class="row">${service.BorrowService.findbook(blist.booid)?.booName}</td>
				<td class="row">${service.BorrowService.findbook(blist.booid)?.booBarCode}</td>
				<td class="row">${service.BorrowService.findbook(blist.booid)?.booStorehouse}</td>
				<td class="row"><img style= "width:80px; height:50px;" src = "${service.BorrowService.findbook(blist.booid)?.simage}" /></td>
			</tr>
		 #{/list}
	</table>
</div>
	<div style="float:right;margin-right: 190px;margin-top:20px;"><a href = "/controllers/indents.list">返回</a></div>
	<script type="text/javascript">
		function updatatime(bid,btime){
			 var  $div = "" ;
    	       $div="<div>借阅卡金额：<input onfocus='data();' id='brtime' type='text' value='"+btime+"' /><input style='margin-left:15px;' id='updatetime' type='button' value='修改' /><input id='brid' type='hidden' value='"+bid+"' /></div>" 
			 aduBox($div,"<font color='red'>修改借阅时间：</font>");
			 $("#updatetime").click(function(){
				$.ajax({
					type:'post',
					url :'/controllers/Borrows.upbrotime',
					data:({"brtime":$("#brtime").val(),"brid":$("#brid").val(),"ordid":${id}}),
					dataType:'html',
					success:function(e){
						if(e == "1"){
							aduAlert("修改成功！","提示",function(){
								window.location.href = "";
							});
						}
						if(e == "0"){
							aduAlert("修改失败！","提示");
						}
					}
				});			 	
			 });
		}
		function data(){
			WdatePicker({dateFmt:'yyyy-MM-dd  HH:mm:ss'});
		}
	</script>
</body>
</html>